Merged
Conversation
frisitano
reviewed
Jan 19, 2026
Collaborator
frisitano
left a comment
There was a problem hiding this comment.
Looks good. Added a few comments inline. Can you add some test cases, please?
I'm also wondering if we can simplify the logic a bit. The idea would be that if we have a connection with a peer over scroll-wire, then we should only gossip on scroll-wire. If we don't have a scroll-wire connection, then we use eth-wire. I think this should allow us to consolidate the block cache per peer into a single cache.
frisitano
reviewed
Jan 30, 2026
Collaborator
frisitano
left a comment
There was a problem hiding this comment.
Addeed some comments inline.
frisitano
reviewed
Jan 30, 2026
frisitano
reviewed
Jan 30, 2026
frisitano
previously approved these changes
Jan 30, 2026
Member
Author
|
I'm planing to build a |
frisitano
approved these changes
Jan 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Malicious peers can DoS the node by sending old blocks.
Solution
Two-layer defense:
if block_number <= finalized_height { penalize(peer); // Immediately reject}// Cache recent blocks per peerif peer_already_sent_this_block { penalize(peer); // DoS detected }Fixes #307